define(['./style'], function(style) {
  var option = {
    title: {
      //text: '访问量与响应时间趋势图分析',
      textStyle: {
        color: style.title.textStyle.color,
        fontSize: style.title.textStyle.fontSize
      }
    },
    tooltip: {},
    legend: {
      orient: 'horizontal',
      left: 'right',
      top: '5%',
      textStyle: {
        color: style.legend.textStyle.color,
        fontSize: style.legend.textStyle.fontSize
      },
      show: true,
      data:[{ name: '访问量', icon: 'circle' },{ name: '响应时间' }]
    },
    grid: {
      top: style.gridPos.top,
      left: style.gridPos.left,
      right: style.gridPos.right,
      bottom: style.gridPos.bottom,
      containLabel: true,
      show: false,
      borderWidth: 1,
      borderColor: style.gridBorderColor
    },
    xAxis: {
      type: 'category',
      nameTextStyle: {
        color: style.fontColor,
        opacity: style.opacity,
        fontSize: style.fontSize
      },
      axisLine: { //轴，下面有条是grid线，
        show: true,
        onZero: false,
        lineStyle: {
          color: style.axisLineColor,
          width: style.axisLine.lineStyle.width,
          opacity: style.notSupportOpacity
        }
      },
      axisTick: { //刻度
        show: false
      },
      axisLabel: {
        show: true,
        margin: 8,
        rotate: 0,
        textStyle: {
          color: style.labelColor,
          opacity: style.notSupportOpacity,
          fontSize: style.fontSize
        }
      },
      splitLine: {
        show: false,
        lineStyle: {
          color: '#236592',
          opacity: style.opacity
        }
      },
      data: ['14:20', '14:40', '15:00', '15:20', '15:40', '15:53']
    },
    yAxis: [{
      type: 'value',
      //name: '访问量',
      nameLocation: 'middle',
      nameGap: 35,
      max: undefined,
      min: undefined,
      interval: undefined,
      nameTextStyle: {
        color: style.fontColor,
        opacity: style.opacity,
        fontSize: style.fontSize
      },
      axisLine: {
        show: true,
        onZero: false,
        lineStyle: {
          opacity: style.notSupportOpacity,
          color: style.axisLineColor,
          width: style.axisLine.lineStyle.width
        }
      },
      axisTick: {
        show: false
      },
      axisLabel: {
        show: true,
        margin: 8,
        //formatter: '{value} ml',
        textStyle: {
          color: style.labelColor,
          fontSize: style.fontSize,
          opacity: style.notSupportOpacity
        }
      },
      splitLine: {
        show: true,
        lineStyle: {
          color: '#236592',
          opacity: style.opacity
        }
      }
    },{
      type: 'value',
      min: undefined,
      max: undefined,
      interval: undefined,
      nameLocation: 'middle',
      nameGap: 35,
      //name: '响应时间',
      nameTextStyle: {
        color: style.fontColor,
        opacity: style.opacity,
        fontSize: style.fontSize
      },
      axisLine: {
        show: true,
        onZero: false,
        lineStyle: {
          opacity: style.notSupportOpacity,
          color: style.axisLineColor,
          width: style.axisLine.lineStyle.width
        }
      },
      axisTick: {
        show: false
      },
      axisLabel: {
        show: true,
        margin: 8,
        //formatter: '{value} s',
        textStyle: {
          color: style.labelColor,
          fontSize: style.fontSize,
          opacity: style.notSupportOpacity
        }
      },
      splitLine: {
        show: false,
        lineStyle: {
          color: '#236592',
          opacity: style.opacity
        }
      }
    }],
    series: [{
      name:'访问量',
      type: 'bar',
      data: [100, 50, 150, 250, 410, 300]
    },{
      name:'响应时间',
      type:'line',
      data: [1, 0.8, 1.5, 2, 2.6, 2.3]
    }]
  };

  return option;
})